package com.web.dao;

import com.web.dto.StoreApplyDto;
import com.web.entity.Kftprovincialcity;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

/**
 *快付通省市区DAO层
 * @author Welcome Chen
 * @date 2018-08-21
 */
public interface KftprovincialcityMapper {
    @Select( {
            "select",
            " id, code, province, city,district ",
            " from t_kftprovincialcity",
            " where province = #{province,jdbcType=VARCHAR} and city = #{city,jdbcType=VARCHAR} and district = #{district,jdbcType=VARCHAR}"
    } )
    @Results({
            @Result(column = "id", property = "id", jdbcType = JdbcType.BIGINT, id = true),
            @Result(column = "code", property = "code", jdbcType = JdbcType.VARCHAR),
            @Result(column = "province", property = "province", jdbcType = JdbcType.VARCHAR),
            @Result(column = "city", property = "city", jdbcType = JdbcType.VARCHAR),
            @Result(column = "district", property = "district", jdbcType = JdbcType.VARCHAR)
    })
    Kftprovincialcity selectByDistrict(StoreApplyDto storeApplyDto);
}
